/**
 * 
 */
package com.wubo.bm.util;

import java.util.Properties;

import org.hsqldb.util.DatabaseManagerSwing;

/**
 * HSQLDB数据库管理器
 * @author WuBo
 * @CreateDate 2012-4-11 下午02:47:34
 */
public class DatabaseManager {
	
	static Properties prop = new Properties();
	
	static {
		try{
			prop.load(DatabaseManager.class.getClassLoader().getResourceAsStream("db.properties"));
		}catch(Exception e){
			throw new ExceptionInInitializerError(e);
		}
	}

	public static void main(String[] args) {
		String[] options = new String[8];
		int idx = 0;
		options[idx++] = "--driver";
		options[idx++] = prop.getProperty("jdbc.driver");
		options[idx++] = "--url";
		options[idx++] = prop.getProperty("jdbc.url");
		options[idx++] = "--user";
		options[idx++] = prop.getProperty("jdbc.username");
		options[idx++] = "--password";
		options[idx++] = prop.getProperty("jdbc.password");
		
		DatabaseManagerSwing.main(options);
	}
}
